import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View,Image,ScrollView,TouchableOpacity} from 'react-native';
import {PictureSelector} from '../nativeModule'

export  default class PhotoPage extends Component{
    constructor(props){
        super(props)
        this.setState={

        }
        this._openPhoto=this._openPhoto.bind(this)
    }
    _openPhoto(){
        PictureSelector.open((err,result)=>{
            console.log(result);
        });
    }
    render(){
        return(
            <View style={{flex:1}}>
                 <TouchableOpacity 
                 onPress={this._openPhoto}
                 style={{height:100,width:100,backgroundColor:'#f00',justifyContent: 'center',alignItems:'center'}}>
                           <Text style={{color:'#ffffff'}}>点击</Text>
                 </TouchableOpacity>
            </View>
        )
    }
}